package domain.extendMappingSingleTable;

import javax.persistence.*;

@Entity
@DiscriminatorValue("顾客")
@Table(name = "customer_inf")
public class Customer extends Person{

    private String comments;

    @ManyToOne(targetEntity = Employee.class,cascade = CascadeType.ALL)
    @JoinColumn(name = "employee_id")
    private Employee employee;

    public Customer() {
    }

    public Customer(String name, char gender, String comments) {
        super(name, gender);
        this.comments = comments;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }
}
